package com.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author 长顺
 * @since 2020-11-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Admin对象", description="")
public class Admin implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "admin_id", type = IdType.ID_WORKER_STR)
    private String adminId;

    @ApiModelProperty(value = "直系领导主键")
    private String adminLeadId;

    @ApiModelProperty(value = "账号（联系电话）")
    private String adminUsername;

    @ApiModelProperty(value = "密码")
    private String adminPassword;

    @ApiModelProperty(value = "姓名")
    private String adminName;

    @ApiModelProperty(value = "角色（0：操作员，1：管理员，2：人事，默认为0）")
    private Integer adminRole;

    @ApiModelProperty(value = "状态（0：在职，1：离职，默认为0）")
    @TableLogic
    private Integer adminState;

    @ApiModelProperty(value = "版本号，用于乐观锁")
    @Version
    private Integer adminVersion;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date adminCreateTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date adminModifyTime;
}
